#ifndef _CPP_STORY_FEATURE_H_
#define _CPP_STORY_FEATURE_H_

#include <string>
#include <vector>
#ifdef WIN32
#include "cppstory_win32.h"
#endif

namespace CppStory
{

class Background;
class Scenario;
class Step;

#ifdef WIN32
class CPPSTORY_WIN32_API Feature
#else
class Feature
#endif
{
public:
    Feature(const char* f, const int l);
    ~Feature();

    void set_feature_name(std::string n) { feature_name = n; }
    void set_in_order(std::string i) { in_order = i; }
    void set_who(std::string w) { who = w; }
    void set_want(std::string w) { want = w; }
    const char* get_feature_name() { return feature_name.c_str(); }
    const char* get_file() { return file.c_str(); }
    const int get_line() { return line; }
    const char* get_in_order() { return in_order.c_str(); }
    const char* get_who() { return who.c_str(); }
    const char* get_want() { return want.c_str(); }

    void register_scenario(Scenario *s);
    std::vector< Scenario* > scenarios;
    Scenario* get_cur_scenario() { return cur_scenario; }

    void create_background();
    Background* get_background() { return background; }

    std::vector< Scenario* > successful_scenarios;
    std::vector< Scenario* > failed_scenarios;
    bool run();
private:
    std::string feature_name;
    std::string file;
    int line;
    std::string in_order;
    std::string who;
    std::string want;
    Scenario* cur_scenario;
    Background* background;
};

}

#endif

